LookAtPilotingItf

Piloting interface used to keep the drone directed towards some target, in effect making it 'looking at' such a target.

Availability

This interface will be unavailable until a specific set of conditions are met:

  • the drone must be flying,
  • the drone must be properly calibrated,
  • the drone must have sufficient GPS location information,
  • the drone must be sufficiently far above the ground,
  • the drone must be sufficiently far away from the target,
  • the application must provide sufficient information to the drone so that it can identify and track the target (see Target selection for further information on how to provide target tracking information.)
All unsatisfied conditions are reported by this interface, when unavailable, so that the application can inform the user and take appropriate measures to satisfy those conditions as appropriate. Once all conditions are satisfied, then the interface will become available and can be activated so that the drone starts looking at the target.

Note that this interface, even while available or active may become unavailable back again, as soon as any of those conditions is not satisfied anymore.

Alerts

When available or active, this interface may also alert about specific conditions that hinders optimally accurate tracking of the target, although tracking remains feasible under such conditions:

  • TODO : refine and list exactly which cases can be forwarded as an 'alert' from the drone.
The application may use such alerts to inform the user and take appropriate measures to improve tracking performance.

Movement

When this interface is active, the drone just rotates from its standstill position to follow the moving target but does not move by itself to follow the latter, unless instructed to move using this interface's setPitch, setRoll or setVerticalSpeed piloting commands. In any case, the drone will try to maintain its orientation towards the target, and thus may move independently of the provided piloting commands to do so.

Target selection

In order for this interface to be available, the application must instruct the drone how to identify and track the desired target. To do so, the TargetTracker peripheral must be used.

Using this peripheral, the application may:

  • Require controller (remote control, or user device) barometer and location information to be sent regularly to the drone. In case sent information is sufficiently accurate, it may be sufficient to allow the drone to track the controller, in which case, provided other requirements are satisfied, the interface will become available and, when active, will make the drone look toward the controller.
  • Provide external information about where the desired target is located, its direction and current movement. Such information may for example come from results of image processing applied to the drone video stream. In case sent information is sufficiently accurate and coherent, it may be sufficient to allow the drone to track the desired target, in which case, provided other requirements are satisfied, the interface will become available and, when active, will make the drone look toward the desired target.

Note that both controller barometer/location information and external target information may be sent to the drone at the same time, provided they give coherent positioning information on the SAME target. For instance, it is possible to perform image processing on the drone video stream to identify the controller and send the results to the drone, along with controller barometer/location updates, for better tracking performance. However, care must be taken not to provide incoherent information, such as forwarding controller/barometer location and, as the same time, external information on a different target than the controller; behavior is undefined in such a case.

This piloting interface can be obtained from a drone using:

drone.getPilotingItf(LookAtPilotingItf.class)

See also

com.parrot.drone.groundsdk.device.Drone

Types

Link copied to clipboard
enum Mode
Look At operating mode.

Functions

Link copied to clipboard
abstract fun activate(): Boolean
Activates this piloting interface.
Link copied to clipboard
abstract fun deactivate(): Boolean
Deactivates this piloting interface.
Link copied to clipboard
Tells why this piloting interface is currently unavailable.
Link copied to clipboard
Alerts about issues that currently hinders optimal behavior of this interface.
Link copied to clipboard
Gets the piloting interface's current state.
Link copied to clipboard
Gives access to the operating mode setting.
Link copied to clipboard
abstract fun setPitch(@IntRange(from = "-100", to = 100) pitch: Int)
Sets the current pitch value.
Link copied to clipboard
abstract fun setRoll(@IntRange(from = "-100", to = 100) roll: Int)
Sets the current roll value.
Link copied to clipboard
abstract fun setVerticalSpeed(@IntRange(from = "-100", to = 100) verticalSpeed: Int)
Set the current vertical speed value.